
<div *ngIf="curWidget.config.chart_type == chartType">
<label class="col-sm-2 control-label">{{'CONFIG.WIDGET.VALUE'|translate}}指标</label>
<div class="col-sm-10">
    <div pDroppable='funnel' [ngClass]='{"highlight":dragEl}' (onDrop)='measuredroped($event);dragEl=false' (onDragEnter)='dragEl=true' style="min-height: 35px;height: auto;padding: 0px">
            
        <div class="col-sm-10">
            <div class="form-control">
                <div *ngFor="let o of curWidget.config.values[0].cols" class="btn-group"
                        style="margin: 3px 3px;">
                        <div [ngSwitch]="o.type">
                            <div *ngSwitchCase="exp" class="btn-group">
                                <button type="button" class="btn btn-primary btn-sm" style="cursor: move;" (click)="curWidget.config.values[0].cols.splice($index, 1);">
                                    {{o.alias}}
                                </button>
                                <button type="button" class="btn btn-primary btn-sm dropdown-toggle" (click)="editSort(o);cleanRowSort(o);">
                                    <span class="fa" [ngClass]="{undefined:'fa-sort','asc':'fa-sort-asc','desc':'fa-sort-desc'}[o.sort]"></span>
                                </button>
                                <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown">
                                    <span class="fa fa-edit"></span>
                                </button>
                                <ul class="dropdown-menu multi-level" role="menu" aria-labelledby="dropdownMenu">
                                    <li *ngIf="!isDsExpression(o)">
                                        <a (click)="editExp(o)">{{'COMMON.EDIT'|translate}}</a>
                                    </li>
                                    <li>
                                        <a (click)="editVFilter(o)">{{'CONFIG.WIDGET.FILTER'|translate}}</a>
                                    </li>
                                </ul>
                            </div>
                            <div *ngSwitchDefault class="btn-group">
                                <button type="button"
                                        (click)="curWidget.config.values[0].cols.splice($index, 1);"
                                        class="btn btn-default btn-sm" style="cursor: move;">
                                    {{o.aggregate_type+'('+o.column+')'+ (o.alias?(' -> '+o.alias):'')}}
                                </button>
                                <button type="button" class="btn btn-default btn-sm dropdown-toggle"
                                        (click)="editSort(o);cleanRowSort(o);">
                                    <span class="fa" [ngClass]="{undefined:'fa-sort','asc':'fa-sort-asc','desc':'fa-sort-desc'}[o.sort]"></span>
                                </button>
                                <button type="button" class="btn btn-default btn-sm dropdown-toggle"
                                        data-toggle="dropdown">
                                    <span class="fa fa-edit"></span>
                                </button>
                                <ul class="dropdown-menu multi-level" role="menu" aria-labelledby="dropdownMenu">
                                    <li>
                                        <input type="text" class="input" [(ngModel)]="o.alias"
                                                placeholder="{{'CONFIG.WIDGET.ALIAS'|translate}}">
                                    </li>
                                    <li class="dropdown-submenu">
                                        <a tabindex="-1">{{'CONFIG.WIDGET.AGGREGATE_TYPE'|translate}}</a>
                                        <ul class="dropdown-menu">
                                            <li *ngFor="let a of value_aggregate_types">
                                                <a (click)="o.aggregate_type=a.value">{{a.name+'('+o.column+')'}}</a>
                                            </li>
                                        </ul>
                                    </li>
                                    <li>
                                        <a (click)="editVFilter(o)">{{'CONFIG.WIDGET.FILTER'|translate}}</a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                </div>   
            </div>  
        </div>
            
    </div>
</div>
</div>
